<template>
  <div id="Daily">
    <el-tabs :tab-position="tabPosition" :value="name" @tab-click="handleClick" style="height: 100%; width: 137px">
      <el-tab-pane :name="item.path" :label="item.label" v-for="(item, index) in Daily_sidebar" :key="index">
      </el-tab-pane>
    </el-tabs>
    <el-main class="Daily_main">
      <router-view></router-view>
    </el-main>

  </div>
</template>

<script>
export default {
  props: {},
  components: {},
  data() {
    return {
      tabPosition: "left",
      name:
        "/home/check/check_upload",

      Daily_sidebar: [
        { path: "/home/check/check_upload", label: "自查表上传" },

      ],
    };
  },
  methods: {
    handleClick(tab, event) {
      this.name = tab.name;
      this.$router.push(this.name);
      window.sessionStorage.setItem("check_name", this.name);
    },
  },
  created() {
    let namebox = window.sessionStorage.getItem("check_name");
    if (namebox != null) {
      this.name = window.sessionStorage.getItem("check_name");
      this.$router.push(this.name);
    }
  },
};
</script>

<style lang="less">
#Daily {
  height: 100%;
  width: 100%;
  padding: 0px;
  margin: 0px;
  display: flex;

  .el-tabs__item {
    height: 50px;
    //垂直居中
    line-height: 50px;
    //水平剧中
    text-align: center;
  }
}

.Daily_main {
  position: absolute;
  left: 110px;
  right: 0;
  top: 0;
  bottom: 0;

  overflow: hidden;
}

.Daily_main::-webkit-scrollbar-thumb {
  border-radius: 3px;
  background: #fff;
}

.Daily_main::-webkit-scrollbar {
  width: 6px;
}

.Daily_main:hover::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
}
</style>